<script setup>
import {ref} from "vue";
// 定义响应式变量
let counts = ref(0)

setInterval(
    () => {
      counts.value = counts.value + 1
      console.log("counts: " + counts.value);
    },
    1000,
)
</script>

<template>
  <h1>当前的计数值：{{ counts }}</h1>
</template>

<style scoped>

</style>